<style>
    .mast{
        color: red;
        font-weight: bold;
        margin-right: 4px;
    }
    .mast::after{
        content: '*';
    }

    #cxselect-example .form-group {
        margin: 10px 0;
    }
    .panel-intro > .panel-heading {
        position: fixed;width: 100%;
        top: 0;
        z-index: 3;
    }
    .fly_tips:before{
        content: "tips：";
    }
    .fly_tips{
        color: #777777;height: 33px;line-height: 33px;
    }
    .fly_tips_error{
        color: #ff6600;
    }
    #p-download_url .thumbnail{margin-bottom: 0;}
    .score_config_box input{
        width: 92px !important;
    }
    .score_config_box .input-group{
        margin-bottom: 8px;
    }
</style>
<div class="panel panel-default panel-intro">
    <div class="panel-heading">

        <ul class="nav nav-tabs" id="tablist">
            <li role="presentation" class="active"><a href="#test_info">试卷信息</a></li>
        </ul>
    </div>

    <form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
        <div class="panel-body" style="margin-top: 45px;">
            <div id="myTabContent" class="tab-content">
                <div class="tab-pane fade active in" id="one">
                    <div class="widget-body no-padding" id="cxselect-example">
                        <!--  试卷信息 start  -->
                        <div style="" id="test_info" class="alert alert-info-light">
                            <p>
                                说明：试卷默认不归属任何课程，一个课程可以有多套试卷。
                            </p>
                            <p>
                                <b style="color:crimson;"><i class="fa fa-exclamation-triangle"></i></b> 新建试卷后，请在 <b style="color:crimson;">【题目编辑处】</b> 进行题目添加修改操作。
                            </p>
                        </div>

                        <div class="panel panel-info">
                            <div class="panel-heading">
                                <h3 class="panel-title">试卷信息</h3>
                            </div>
                            <div class="panel-body">
                                <!--  表单信息 start  -->
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-2">{:__('Course_id')}:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <input id="c-course_id" data-rule="" min="0" data-source="classroom/course/index" data-order-by="id desc" class="form-control selectpage" name="row[course_id]" type="text" value="0" placeholder="默认不归属任何课程">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-2"><span class="mast"></span>{:__('Title')}:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-2"><span class="mast"></span>{:__('考试时间')}:</label>
                                    <div class="col-xs-6 col-sm-4">
                                        <input id="c-start_time" data-rule="required" min="0" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[start_time]" type="text" value="{:date('Y-m-d H:i:s')}" placeholder="请输入考试开始时间">
                                    </div>
                                    <div class="col-xs-6 col-sm-4">
                                        <input id="c-end_time" data-rule="required" min="0" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[end_time]" type="text" value="" placeholder="请输入考试结束时间">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-2">{:__('Pass_score')}:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <input id="c-pass_score" data-rule="required" class="form-control" name="row[pass_score]" type="number" min="0" step="1" value="0" style="width:80px;">
                                        <div class="fly_tips fly_tips_error">不及格的用户，在试卷开启<b style="color:crimson;margin:0 4px;">【复考】</b>时，可以再次提交试卷。</div>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-2">{:__('Score_config')}:</label>
                                    <div class="col-xs-12 col-sm-8">

                                        <div class="form-inline score_config_box">
                                            <div class="input-group">
                                                <div class="input-group-addon">选择题</div>
                                                <input type="number" name="row[score_config][1]" value="0" class="form-control" placeholder="每题分数值">
                                            </div>
                                            <div class="input-group">
                                                <div class="input-group-addon">多选题</div>
                                                <input type="number" name="row[score_config][2]" value="0" class="form-control" placeholder="每题分数值">
                                            </div>
                                            <div class="input-group">
                                                <div class="input-group-addon">判断题</div>
                                                <input type="number" name="row[score_config][3]" value="0" class="form-control" placeholder="每题分数值">
                                            </div>
                                            <div class="input-group">
                                                <div class="input-group-addon">填空题</div>
                                                <input type="number" name="row[score_config][4]" value="0" class="form-control" placeholder="每题分数值">
                                            </div>
                                            <div class="input-group">
                                                <div class="input-group-addon">问答题</div>
                                                <input type="number" name="row[score_config][5]" value="0" class="form-control" placeholder="每题分数值">
                                            </div>
                                        </div>
                                        <div class="fly_tips fly_tips_error">每题默认分值，权重低于题目编辑时，内部设定值。</div>

                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-2">{:__('Order_config')}:</label>
                                    <div class="col-xs-12 col-sm-8">

                                        <div class="form-inline">

                                            <dl class="fieldlist" data-name="row[order_config]" data-template="order_config_tpl">
                                                <dd>
                                                    <ins>题型</ins>
                                                    <ins>排序</ins>
                                                </dd>
                                                <textarea name="row[order_config]" class="form-control hide" cols="30" rows="5">{$type_arr|htmlentities}</textarea>
                                            </dl>
                                            <!--定义模板，模板语法使用Art-Template模板语法-->
                                            <script type="text/html" id="order_config_tpl">
                                                <dd class="form-inline">
                                                    <input style="width: 110px;display: none;" type="text" name="order_config[<%=index%>][id]" class="form-control" value="<%=row['id']%>">
                                                    <input style="width: 110px;" type="text" name="order_config[<%=index%>][value]" class="form-control" value="<%=row['value']%>">
                                                    <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                                                </dd>
                                            </script>

                                        </div>
                                        <div class="fly_tips fly_tips_error">用于试卷的题型排序功能，同题型将分配在一个区域块。</div>

                                    </div>
                                </div>


                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
                                    <div class="col-xs-12 col-sm-8">

                                        <div class="radio">
                                            {foreach name="statusList" item="vo"}
                                            <label for="row[status]-{$key|htmlentities}"><input id="row[status]-{$key|htmlentities}" name="row[status]" type="radio" value="{$key|htmlentities}" {in name="key" value="0"}checked{/in} /> {$vo|htmlentities}</label>
                                            {/foreach}
                                        </div>

                                    </div>
                                </div>
                                <!--  表单信息 end  -->
                            </div>
                        </div>
                        <!--  试卷信息 end  -->
                        
                    </div>
                </div>
            </div>
        </div>

        <div class="form-group layer-footer">
            <label class="control-label col-xs-12 col-sm-2"></label>
            <div class="col-xs-12 col-sm-8">
                <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            </div>
        </div>
    </form>

</div>